Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 12 - Datagram Delivery Protocol (DDP) / DDP Reference


Options

In order to use any option with DDP, you must indicate which protocol the option is intended for. To do this, you use a constant for the DDP protocol in the level field of the TOption structure when you specify an option.

#define ATK_DDP   'DDP '
DDP has one DDP-specific option, DDP_OPT_SRCADDR, that sets the source address for outgoing packets.

#define DDP_OPT_SRCADDR0x2101 /* DDP source addr override*/
A multinode endpoint must use the DDP_OPT_SRCADDR option to specify the source address for outgoing packets on a per-packet basis. This option cannot be used with the OptionManagement function. The option's value must be a DDP address structure using the AF_ATALK_DDP address format. The source network number, node number, and source socket are taken from the DDP address. It is an error for these values to be illegal.

This option is most often used in conjuction with a multinode endpoint, but it can also be used on normal endpoints.

DDP also allows you to use the generic Open Transport options OPT_SELFSEND and OPT_CHECKSUM, which are described in the chapter "Option Management" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996